/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once


#include <几何数据.h>
#include <vulkan/vulkan.h>

//#include "../绘图框架.h"
#include "引擎枚举数据.h"



inline VkSampleCountFlagBits f_get多重采样Bits(E_MS次数 num) {
	switch (num) {
	case 0:
	case 1: return VK_SAMPLE_COUNT_1_BIT;

	case 2: return VK_SAMPLE_COUNT_2_BIT;
		
	case 4: return VK_SAMPLE_COUNT_4_BIT;
	
	case 8: return VK_SAMPLE_COUNT_8_BIT;

	case 16: return VK_SAMPLE_COUNT_16_BIT;

	case 32: return VK_SAMPLE_COUNT_32_BIT;

	case 64: return VK_SAMPLE_COUNT_64_BIT;

	default:
		return VK_SAMPLE_COUNT_1_BIT;
	}
}





VkAttachmentDescription	f_创建附件描述(const VkFormat& 格式,
	VkImageLayout 图像布局类型 = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR,
	VkSampleCountFlagBits 采用次数 = VK_SAMPLE_COUNT_1_BIT);



VkRenderPass f_创建渲染通道(VkDevice& dev, const VkFormat& 颜色格式, const VkFormat& 深度格式, E_MS次数 采样次数 = E_MS次数::e_MS_1);
VkRenderPass f_创建纹理渲染通道(VkDevice& dev, const VkFormat& 颜色格式, const VkFormat& 深度格式, E_MS次数 采样次数 = E_MS次数::e_MS_1);
//VkRenderPass f_创建多重采样渲染通道(VkDevice& dev, const VkFormat& 颜色格式, const VkFormat& 深度格式, uint8 采样次数);







void f_Vk绘制(VkDevice& dev);






